package com.brid.rocketmq.web;

import com.brid.rocketmq.dao.ShareMapper;
import com.brid.rocketmq.domain.dto.ShareAuditDTO;
import com.brid.rocketmq.domain.dto.UserAddBonusMsgDTO;
import com.brid.rocketmq.domain.entity.Share;
import com.brid.rocketmq.domain.vo.ShareVO;


import com.brid.rocketmq.server.RocketMqService;
import com.brid.rocketmq.server.impl.RocketMqServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.messaging.MessagingException;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

/**
 * @Author: 司军强
 * @Date: 12:16 2020/1/21
 * @Description: 用户积分
 */
@RestController
@Slf4j
public class ShareAdmainController {

//    @Autowired
//    private RocketMqService rocketMqService;

    @Autowired
    private RocketMqServiceImpl rocketMqService;


    @PostMapping(value = "/share",produces = MediaType.APPLICATION_JSON_VALUE)
    public ShareVO auditById(@RequestBody ShareAuditDTO auditDTO) {
        return  rocketMqService.auditById(auditDTO);

    }
}